All Questions
2 questions
1vote
2answers
4kviews
Using the same name for setter and gettter methods for a boolean member variable
Say I have class with a boolean member variable fancy: public class MyClass { private boolean fancy; } Case 1. I could the define the setter and getter as follows: // getter public boolean ...
1vote
2answers
5kviews
SonarQube is complaining about: "Use isEmpty() to check whether the collection is empty or not."
So as my the title says, SonarQube is complaining whenever you use list.size() == 0 or list.size > 0 However I started changing to isEmpty() and !is.Empty() and noticed the code becomes way ...